import React from 'react'
import { Tabbar } from 'react-vant';
import {homechild} from '../router/index'
import {NavLink} from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'
function Mytabbar() {
  let homechild1 = homechild.filter((item)=>item.tit)
  return (
    <div className='demo-tabbar'>
      <Tabbar>
        {/* <Tabbar.Item icon={<HomeO />}>标签</Tabbar.Item>
        <Tabbar.Item icon={<Search />}>标签</Tabbar.Item>
        <Tabbar.Item icon={<FriendsO />}>标签</Tabbar.Item>
        <Tabbar.Item icon={<SettingO />}>标签</Tabbar.Item> */}
        {
            homechild1.map((item,index)=>{
                return   <Tabbar.Item icon={item.icon} key={index}>
                    <NavLink to={item.path}>{item.tit}</NavLink>
                </Tabbar.Item>
            })
        }

      </Tabbar>
    </div>
  )
}

export default Mytabbar